How to Connect Telemetry Services to Pharia Assistant
This guide explains how to connect telemetry services to Pharia Assistant to monitor application performance, errors, and user interactions. Pharia Assistant supports two telemetry providers: OpenTelemetry (OTel) and Grafana Faro.
Supported Telemetry Providers
- OpenTelemetry (OTel) - Backend + Frontend RUM (Real User Monitoring)
- Grafana Faro - Frontend (OTel-based)
Quick Start
You can use one or both telemetry options:
Option 1: Grafana Faro for frontend and OTel for backend
# values.yaml
pharia-assistant:
faroTelemetryUrl: "https://your-faro-endpoint.com/collect"
faroPublicApiKey: "your-faro-api-key"
pharia-assistant-api:
otlp:
endpoint: "https://your-otel-collector.com/v1/traces"
sampleRate: 0.1 # Captures 10% of requests for monitoring
Option 2: OpenTelemetry
# values.yaml
pharia-assistant:
otelCollectorUrl: "https://your-otel-collector.com/v1/traces"
pharia-assistant-api:
otlp:
endpoint: "https://your-otel-collector.com/v1/traces"
sampleRate: 0.1 # Captures 10% of requests for monitoring
Option 3: Both Faro and OTel
# values.yaml
pharia-assistant:
faroTelemetryUrl: "https://your-faro-endpoint.com/collect"
faroPublicApiKey: "your-faro-api-key"
otelCollectorUrl: "https://your-otel-collector.com/v1/traces"
pharia-assistant-api:
otlp:
endpoint: "https://your-otel-collector.com/v1/traces"
sampleRate: 0.1 # Captures 10% of requests for monitoring
Backend Monitoring (OpenTelemetry)
When to use: Monitor API performance, track errors, debug distributed requests.
Setup
- Get collector URL from your infrastructure team or managed service
- Add to values.yaml:
pharia-assistant-api:
otlp:
endpoint: "https://your-otel-collector.com/v1/traces"
sampleRate: 0.1 # Captures 10% of requests for monitoring
Frontend Monitoring
When to use: Capture client-side errors and correlate them with backend errors and traces.
Option 1: Grafana Faro (OTel-based)
Faro sends traces to OpenTelemetry via its own collector.
Setup
- Get Faro endpoint & key from Grafana Cloud
- Add to values.yaml:
- Optional: Specify an app identifier for collected telemetry
pharia-assistant:
faroTelemetryUrl: "https://your-faro-endpoint.com/collect"
faroPublicApiKey: "your-faro-api-key"
instrumentationAppIdentifier: "my-assistant" # Optional
Option 2: OpenTelemetry RUM (Direct)
Direct Real User Monitoring with OpenTelemetry.
Setup
- Get OTLP endpoint from your collector
- Add to values.yaml:
- Optional: Specify an app identifier for collected telemetry
pharia-assistant:
otelCollectorUrl: "https://your-otel-collector.com/v1/traces"
instrumentationAppIdentifier: "my-assistant" # Optional
CORS Configuration
Important: Your telemetry collector must enable CORS support for your Pharia Assistant domain.
For OpenTelemetry Collector
Add CORS configuration to your collector:
receivers:
otlp:
protocols:
http:
cors:
allowed_origins:
- "https://your-assistant-domain.com"
- "https://*.your-domain.com"
allowed_headers:
- "*"
For Grafana Faro
Ensure your Faro backend allows requests from your assistant domain in its CORS settings.